package com.jt.auth.service;

import com.jt.auth.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * feign远程调用接口，调用sso-system的基于用户名查询用户信息服务和基于用户id查询用户权限的服务
 */
@FeignClient(value = "sso-system",contextId = "remoteUserService")
public interface RemoteUserService {
    @GetMapping("/user/login/{username}")
    public User selectUserByName(@PathVariable("username") String username);

    @GetMapping("/user/permission/{userId}")
    public List<String> selectUserPermissions(@PathVariable("userId") Long userId);
}
